def resolution1():
    a = int(input())
    temp = a
    while temp:
        temp = temp - 1
        if a % temp == 0:
            print(temp)
            break


if __name__ == '__main__':
    resolution1()